<script>
	// function geturlparam(name) {
	//         let that = this
	//         let p = window.location.href.split('?')[1]
	//         let keyValue = p.split('&');
	//         let obj = {};
	//         for (let i = 0; i < keyValue.length; i++) {
	//           let item = keyValue[i].split('=');
	//           let key = item[0];
	//           let value = item[1];
	//           obj[key] = value;
	//         }
	//          return params.get(obj.name);
	//       }

	export default {
		onLaunch: function(e) {
			const URL1 = e?.query?.q;
			uni.setStorageSync("sourceUserId", e.query.sourceUserId);
			// geturlparam('sourceUserId');
			const tabPaths = [
				'pages/serve/detail',
			]
			if (tabPaths.includes(e.path)) {
				uni.setStorageSync('sharePath',e.path + `?id=${e.query.id}`)
			}
		},
		onShow: function(e) {
			const tabPaths = [
				'pages/serve/detail',
			]
			if (tabPaths.includes(e.path)) {
				uni.setStorageSync('sharePath',e.path + `?id=${e.query.id}`)
				// this.$toast(this.sharePath)
			}
		},
	};
</script>

<style lang="scss">
	/*每个页面公共css */
	// 导入uview基础样式
	@import "@/uni_modules/uview-plus/index.scss";
	/* 每个页面公共css */
	@import "@/common/scss/common.scss";
	// 导入字体图标
	@import "@/static/iconfont/iconfont.css";
</style>